Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refinements to CI action #595

Merged
merged 11 commits into from
Aug 1, 2023
Merged

Refinements to CI action #595

merged 11 commits into from
Aug 1, 2023

Conversation

iAmWillShepherd
Copy link
Contributor

@iAmWillShepherd iAmWillShepherd commented Aug 29, 2022

Description

Refinements made to CI workflow to enable action to run to completion.

This PR also addresses most of the messages generated by the analyzer command.

╭─iamwill@zues ~/code/@onesignal/OneSignal-Flutter-SDK ‹workflows-for-everyone› 
╰─$ flutter analyze --no-pub --no-fatal-infos                                                                                                                                   1 ↵
Analyzing OneSignal-Flutter-SDK...                                      

   info • Avoid using braces in interpolation when not needed • example/lib/main.dart:41:59 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed • example/lib/main.dart:50:51 • unnecessary_brace_in_string_interps
   info • The operand can't be null, so the condition is always false • example/lib/main.dart:130:16 • unnecessary_null_comparison
   info • The operand can't be null, so the condition is always false • example/lib/main.dart:268:21 • unnecessary_null_comparison
   info • The operand can't be null, so the condition is always false • example/lib/main.dart:278:21 • unnecessary_null_comparison
   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This feature was
          deprecated after v1.26.0-18.0.pre. • example/lib/main.dart:583:15 • deprecated_member_use
   info • 'FlatButton.FlatButton' is deprecated and shouldn't be used. Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This
          feature was deprecated after v1.26.0-18.0.pre. • example/lib/main.dart:583:15 • deprecated_member_use
   info • The declaration '_processSettings' isn't referenced • lib/onesignal_flutter.dart:514:24 • unused_element
   info • The operand can't be null, so the condition is always false • lib/onesignal_flutter.dart:517:18 • unnecessary_null_comparison
   info • Unused import: 'package:flutter/foundation.dart' • lib/src/create_notification.dart:2:8 • unused_import
   info • The import of 'package:onesignal_flutter/src/notification.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:onesignal_flutter/onesignal_flutter.dart' • lib/src/create_notification.dart:3:8 • unnecessary_import
   info • The import of 'package:onesignal_flutter/src/defines.dart' is unnecessary because all of the used elements are also provided by the import of
          'package:onesignal_flutter/onesignal_flutter.dart' • lib/src/notification.dart:1:8 • unnecessary_import
   info • Unused import: 'package:flutter/foundation.dart' • lib/src/notification.dart:4:8 • unused_import
   info • Use `;` instead of `{}` for empty constructor bodies • lib/src/outcome_event.dart:38:20 • empty_constructor_bodies
   info • The import of 'dart:async' is unnecessary because all of the used elements are also provided by the import of 'package:flutter_test/flutter_test.dart' •
          test/mock_channel.dart:1:8 • unnecessary_import
   info • Unused import: 'package:onesignal_flutter/src/defines.dart' • test/notification_test.dart:3:8 • unused_import

Motivation

The primary step of this action is to run tests; however, info and warning messages from the analysis step were being treated as fatal.

Testing

  1. Navigate to the CI workflow
  2. Click the Run workflow dropdown button
  3. Select the workflows-for-everyone branch
  4. Click the Run workflow primary button
  5. Inspect the run to ensure things run to completion despite warning messages emitted by the analyze step

Resources

Manually dispatch action

Screen Shot 2022-08-29 at 1 04 05 PM

References


This change is Reviewable

@iAmWillShepherd iAmWillShepherd added the dev-ops Tasks relating to the CI/CD and release processes label Aug 29, 2022
@iAmWillShepherd iAmWillShepherd requested a review from a team August 29, 2022 20:04
The author property is deprecated in favor of [verified publishers](https://dart.dev/tools/pub/publishing#create-verified-publisher).
Corrects the following issues from the analyzer:

* info • Avoid using braces in interpolation when not needed • example/lib/main.dart:41:59 • unnecessary_brace_in_string_interps
* info • Avoid using braces in interpolation when not needed • example/lib/main.dart:50:46 • unnecessary_brace_in_string_interps
This addresses issues found in the analyzer similar to:

   info • The operand can't be null, so the condition is always false • example/lib/main.dart:130:16 • unnecessary_null_comparison
Fixes issues raised by the analyzer similar t:

* info • Unused import: 'package:flutter/foundation.dart' • lib/src/create_notification.dart:2:8 • unused_import
   info • The import of 'package:onesignal_flutter/src/notification.dart' is unnecessary because all of the used elements are also provided by the import of
* 'package:onesignal_flutter/onesignal_flutter.dart' • lib/src/create_notification.dart:3:8 • unnecessary_import
@iAmWillShepherd
Copy link
Contributor Author

I'm not sure how to handle the remaining messages returned from the analyzer.

╭─iamwill@zues ~/code/@onesignal/OneSignal-Flutter-SDK ‹workflows-for-everyone●› 
╰─$ flutter analyze --no-pub --no-fatal-infos
Analyzing OneSignal-Flutter-SDK...                                      

   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This feature was
          deprecated after v1.26.0-18.0.pre. • example/lib/main.dart:582:15 • deprecated_member_use
   info • 'FlatButton.FlatButton' is deprecated and shouldn't be used. Use TextButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This
          feature was deprecated after v1.26.0-18.0.pre. • example/lib/main.dart:582:15 • deprecated_member_use
   info • The declaration '_processSettings' isn't referenced • lib/onesignal_flutter.dart:531:24 • unused_element

Copy link
Contributor

@fhboswell fhboswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Lets get this in and then add it to the user_model branch as well.

@emawby
Copy link
Contributor

emawby commented Aug 1, 2023

Looks like we just need to fix the version conflict to get this merged in!

@emawby emawby merged commit d553e73 into main Aug 1, 2023
1 of 2 checks passed
@emawby emawby deleted the workflows-for-everyone branch August 1, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-ops Tasks relating to the CI/CD and release processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants